package br.ufrj.dcc.ad.event;

import br.ufrj.dcc.ad.Simulator;

public abstract class Event implements Comparable<Event> {
	
	private final Double time;

	public Event(Double waitTime) {
		this.time = Simulator.getTime() + waitTime;
	}
	
	@Override
	public int compareTo(Event o) {
		return time.compareTo(o.getTime());
	}

	public Double getTime() {
		return time;
	}
	
	@Override
	public String toString() {
		return time.toString();
	}

}
